package com.cdb.controller;

import com.cdb.service.DataModelService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/movie")
public class MovieController {

    @Resource
    private DataModelService dataModelService;

    @GetMapping("get_data_model")
    public void getDataModel() {
        dataModelService.exportTableStructureToExcel();
    }

    @GetMapping("get_table_create_sql")
    public void getTableCreateSQL() {
        dataModelService.exportTableToSqlFile();
    }

    @GetMapping("get_ali_table_create_sql")
    public void getAliTableCreateSQL() {
        dataModelService.exportAliTableToSqlFile();
    }

}
